package com.liumulingyu.utils;

import java.util.Arrays;

public class BaZiPaiPan {


    public static void main(String[] args) {
        String  name="蒋雯雯";
        String  sex="女";
        SolarLunarConverter.Lunar lunar=new SolarLunarConverter.Lunar(false,1997,9,06);
        SolarLunarConverter.Solar soloar=SolarLunarConverter.LunarToSolar(lunar);
        String[] bazi = BaZiUtil.getYangLiBaZi(soloar.getSolarYear(), soloar.getSolarMonth(), soloar.getSolarDay(), 14);
        System.out.println("姓名："+name);
        System.out.println("性别："+sex);
        System.out.println("阳历出生时期："+ soloar);
        System.out.println("阴历出生日期："+ lunar);
        System.out.println("八字："+ Arrays.toString(bazi));
        System.out.println("生肖："+ BaZiUtil.getShengXiao(bazi));
        System.out.println("星座："+ BaZiUtil.getConstellation(soloar.getSolarMonth(),soloar.getSolarDay()));
        System.out.println("本命："+BaZiUtil.getBenMing(bazi));

        System.out.println("年藏干："+BaZiUtil.getZhangGanByDiZhi(bazi[0].substring(1,2)));
        System.out.println("月藏干："+BaZiUtil.getZhangGanByDiZhi(bazi[1].substring(1,2)));
        System.out.println("日藏干："+BaZiUtil.getZhangGanByDiZhi(bazi[2].substring(1,2)));
        System.out.println("时藏干："+BaZiUtil.getZhangGanByDiZhi(bazi[3].substring(1,2)));


        System.out.println("日干的年干十神："+BaZiUtil.getShiSheng(bazi[2].substring(0,1),bazi[0].substring(0,1)));
        System.out.println("日干的月干十神："+BaZiUtil.getShiSheng(bazi[2].substring(0,1),bazi[1].substring(0,1)));
        System.out.println("日干的日干十神："+BaZiUtil.getShiSheng(bazi[2].substring(0,1),bazi[2].substring(0,1)));
        System.out.println("日干的时干十神："+BaZiUtil.getShiSheng(bazi[2].substring(0,1),bazi[3].substring(0,1)));

        //计算日干与藏干的十神
        String  nianCangGan[]=BaZiUtil.getZhangGanByDiZhi(bazi[0].substring(1,2)).split("，");
        for (int i=0;i<nianCangGan.length;i++){
            System.out.println(bazi[2].substring(0,1)+nianCangGan[i]);
            System.out.println("日干的年藏十神："+BaZiUtil.getShiSheng(bazi[2].substring(0,1),nianCangGan[i]));
        }
        //排大运

    }

}
